package org.warehouse.dao;

import java.util.List;

import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.warehouse.dao.exception.DaoException;
import org.warehouse.entity.IEntity;

public interface IDao<T extends IEntity> {
    
    String getTableName();
    
    String getIdColumnName();
    
    T createAndFillEntity(SqlRowSet rowSet);
    
    List<T> getAll();
    
    T get(Integer id) throws DaoException;
    
    Integer put(T entity) throws DaoException;
    
    void delete(Integer id) throws DaoException;
    
    void update(Integer id, T entity) throws DaoException;
    
}
